package day03;

/**
 * 说明:
 *
 * @author: luohaowei
 * @date:2023/2/14
 **/
public class OperDemo {
    public static void main(String[] args) {
       /* int a=5;
        int b=5;
        int c=a++;
        int d=++b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);8/

        */
        /*
        int a=5,b=10,c=5;
        boolean b1=a>b;
        System.out.println(b1);
        System.out.println(c<b);
        System.out.println(a>=c);
        System.out.println(a<=b);
        System.out.println(a==c);
        System.out.println(a!=c);
        System.out.println(a%2==0);
        System.out.println(a+c>b);
        System.out.println(a++>5);
        System.out.println(a++>5);
        */
        /*int a=5, b=10, c=5;
        boolean b1=b>=a&& b<c;
        System.out.println(b1);
        System.out.println(b<=c&&b>a);
        System.out.println(a==b&&b<a);
        System.out.println(b!=c&&b>a);
        int age=99;
        System.out.println(age>=18&&age<=50);
        int score=86;
        System.out.println(score>=0&&score<=100);

         */
        short s=5;
        s=(short)(s+10); //编译错误虚强转改为s=(short)(s+10)
        s+=10;//相当于s=(short)(s+10)
        int a=5;
        a +=10;
        System.out.println(a);//相当于a=(int)(a+10) 15
        a*=2;//相当于a=(int)(a*2)
        System.out.println(a);//30
        a/=6;//相当于a=(int)(a/6)
        System.out.println(a);//5
        int age=27;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我今年"+age+"岁了");
        String name="XL";
        System.out.println("大家好,我叫"+name);
        System.out.println("大家好,我叫"+name+",今年"+age+"岁了");
        System.out.println(10+20+""+30);
        System.out.println(""+10+20+30);
        System.out.println(10+20+30+"");
        int num=0;
        int flag=num>0?1:-1;
        System.out.println(flag);
        int a1=8,b=55;
        int max=a>b?a:b;
        System.out.println(max);
    }
}
